/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package swingDemoEvent;

/**
 *
 * @author Administrator
 */
import java.awt.FlowLayout;
import java.awt.Container;
import javax.swing.JButton;
import javax.swing.JFrame;

public class FlowLayoutTest extends JFrame {

    FlowLayoutTest() {
        super("FlowLayoutTest");
        this.setSize(500, 500);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        FlowLayout fo = new FlowLayout();
        setLayout(fo);
        JButton[] buttons = new JButton[8];
        for (int i = 0; i < buttons.length; i++) {
            buttons[i] = new JButton("test" + i);
            add(buttons[i]);
        }

    }

    public static void main(String[] args) {
        FlowLayoutTest t = new FlowLayoutTest();
        t.setVisible(true);
    }
}
